package com.rfid.base.base;

import android.os.Handler;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

public class BasePresenter<T0> {

    protected  String TAG = getClass().getName();

    protected Executor mExcutor = Executors.newSingleThreadExecutor();
    protected Handler mHandler = new Handler();

    protected T0 mView;

    public void onAttach(T0 t) {
        mView = t;
    }

    public void detach() {
        mView = null;
    }

    protected void runOnUiThread(Runnable runnable) {
        mHandler.post(runnable);
    }
}
